/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.cabarrus.xltosql.util;

import org.jdesktop.beansbinding.Converter;

/**
 *
 * @author moscac
 */
public class DbTypeConverter extends Converter {
    public DbTypeConverter() {
    }
    public String convertForward(Object value) {
        return dbTypes.getDbTypeName((Integer)value);
    }
    public Integer convertReverse(Object value) {
        return ((DBType)value).getDbType();
    }

    public void setDbTypes(DBTypes dbTypes) {
        this.dbTypes = dbTypes;
    }

    private DBTypes dbTypes = null;
}
